package lab03.test06;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.*;

class WordComparator implements Comparator{
    public int compare(Object arg0,Object arg1)
    {
        Map.Entry<String,Integer>map1=(Map.Entry<String,Integer>)arg0;
        Map.Entry<String,Integer>map2=(Map.Entry<String,Integer>)arg1;
        return Integer.parseInt(map2.getValue().toString())-Integer.parseInt(map1.getValue().toString());
    }
}
